﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace PYS.Session
{
    public class SessionAnswers
    {
        public static void AddAnswer(HttpSessionStateBase session, int choregraphyID, int mixID)
        {
            session[choregraphyID.ToString()] = mixID;
        }

        public static int GetAnswer(HttpSessionStateBase session, int choregraphyID)
        {
            if (AnswerExists(session, choregraphyID))
            {
                return (int)session[choregraphyID.ToString()];
            }
            else
            {
                return 0;
            }
        }

        public static bool AnswerExists(HttpSessionStateBase session, int choregraphyID)
        {
            return session[choregraphyID.ToString()] != null;
        }

        public static void ClearAnswers(HttpSessionStateBase session)
        {
            session.Clear();
        }
    }
}